<?php
	$title='Fitness information';
?>
<?php include('./fns_all.php'); ?>
<?php include('./views/layouts/_header.php'); ?>
<?php include('./views/layouts/_left.php'); ?>

<p class="heading1">Top rated articles:<p>

<?php
$result = top_rated_articles();

$myrow = mysqli_fetch_assoc($result);

do {

printf ("<br/><table>

         <tr>
         <td>
			 <p class='article_title'><a href='./articles/view_article.php?id=%s'>%s</a></p>
			 <p >Date added: %s</p>
			 <p >Author: <span class='article_author'>%s<span></p>
		 </td>
         </tr>

         </table>",$myrow["id"], $myrow["title"],$myrow["date"],$myrow["author"]);

}while ($myrow = mysqli_fetch_assoc($result));
?>


<?php include('./views/layouts/_footer.php'); ?>